<?php 
$sql="CREATE TABLE IF NOT EXISTS `ims_hc_ad` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `appid` varchar(50) NOT NULL,
  `path` varchar(200) NOT NULL,
  `desc` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_bonus` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `sid` int(11) NOT NULL,
  `money` decimal(10,2) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `addtime` char(10) NOT NULL,
  `dealtime` char(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_dan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `dan_id` int(11) NOT NULL,
  `season` tinyint(3) NOT NULL,
  `name` varchar(20) DEFAULT NULL,
  `thumb` varchar(100) DEFAULT NULL,
  `win_star` tinyint(3) DEFAULT '0',
  `use_gold` int(11) DEFAULT '0',
  `win_gold` int(11) DEFAULT '0',
  `quesids` text NOT NULL,
  `reward` int(11) NOT NULL DEFAULT '0',
  `winexp` int(11) NOT NULL,
  `failexp` int(11) NOT NULL,
  `rewardnum` tinyint(3) NOT NULL DEFAULT '0',
  `border` varchar(200) NOT NULL,
  `createtime` char(10) DEFAULT NULL,
  `robot` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1开启',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_dy_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `uid` int(11) NOT NULL COMMENT 'members UID',
  `uniacid` int(11) NOT NULL COMMENT '所属公众号ID',
  `openid` varchar(255) NOT NULL COMMENT 'openid',
  `formid` varchar(255) NOT NULL COMMENT 'formid每次记录表单ID',
  `nick_name` varchar(255) NOT NULL COMMENT '昵称',
  `avatar_url` varchar(255) NOT NULL COMMENT '头像',
  `gender` int(1) NOT NULL COMMENT '性别0是男 1是女',
  `city` varchar(255) NOT NULL COMMENT '市',
  `province` varchar(255) NOT NULL COMMENT '省',
  `country` varchar(255) NOT NULL COMMENT '国籍',
  `regist_time` varchar(255) NOT NULL COMMENT '注册时间',
  `active_time` varchar(255) NOT NULL COMMENT '最后活动时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_dy_yingpian` (
  `id` int(25) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `uniacid` int(25) NOT NULL COMMENT '所属公众号ID',
  `yingpian_title` varchar(255) NOT NULL COMMENT '影片名字',
  `yingpian_img` varchar(255) NOT NULL COMMENT '影片海报',
  `yingpian_zhuyan` varchar(255) NOT NULL COMMENT '影片主演',
  `yingpian_lei` text NOT NULL COMMENT '类  电影  电视  综艺',
  `yingpian_leiname` text NOT NULL COMMENT '影片的类型',
  `yingpian_diqu` varchar(255) NOT NULL COMMENT '影片地区',
  `yingpian_nianfen` text NOT NULL COMMENT '影片年份',
  `yingpian_pingfen` int(25) NOT NULL COMMENT '影片评分',
  `yingpian_jieshao` varchar(255) NOT NULL COMMENT '影片介绍',
  `yingpian_url` varchar(255) NOT NULL COMMENT '影片地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_formid` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `formid` varchar(50) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5515 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_grade` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `levelno` int(11) NOT NULL,
  `levelname` varchar(20) NOT NULL,
  `levelexp` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT '0',
  `uid` int(11) DEFAULT '0',
  `pid` int(11) DEFAULT '0',
  `ordersn` varchar(30) DEFAULT '',
  `formId` varchar(50) DEFAULT '',
  `fee` decimal(11,2) NOT NULL,
  `status` tinyint(1) DEFAULT '0',
  `paystatus` tinyint(1) NOT NULL DEFAULT '0',
  `paytime` char(10) NOT NULL,
  `transid` varchar(50) DEFAULT '',
  `createtime` int(10) DEFAULT '0',
  `package` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=92 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_pk_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `rid` int(11) DEFAULT NULL,
  `uid` int(11) DEFAULT NULL,
  `usegold` int(11) NOT NULL,
  `score` int(11) NOT NULL,
  `gold` int(11) NOT NULL,
  `expe` int(11) NOT NULL,
  `scoreplus` int(11) NOT NULL,
  `goldplus` int(11) NOT NULL,
  `expeplus` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3273 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_pk_question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `rid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `qid` int(11) NOT NULL,
  `answer` char(1) NOT NULL,
  `plus` int(5) DEFAULT '0',
  `score` int(5) DEFAULT '0',
  `min` int(11) NOT NULL,
  `right` tinyint(1) NOT NULL DEFAULT '0',
  `addtime` char(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29992 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_pk_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `dan` int(11) NOT NULL,
  `userid_one` int(11) DEFAULT NULL,
  `userid_two` int(11) DEFAULT NULL,
  `userone_score` int(11) DEFAULT '0',
  `usertwo_score` int(11) DEFAULT '0',
  `questions` text NOT NULL,
  `status1` tinyint(1) NOT NULL DEFAULT '0',
  `status2` tinyint(1) NOT NULL DEFAULT '0',
  `createtime` char(10) DEFAULT NULL,
  `type` tinyint(1) DEFAULT '0' COMMENT '1好友对战',
  `leave` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1加入2开始3离开',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4255 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_prop` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  `thumb` varchar(200) DEFAULT NULL,
  `usethumb` varchar(200) NOT NULL,
  `newthumb` varchar(200) NOT NULL,
  `cc` int(4) NOT NULL DEFAULT '0',
  `sj` int(4) NOT NULL DEFAULT '0',
  `jb` int(4) NOT NULL DEFAULT '0',
  `jy` int(4) NOT NULL DEFAULT '0',
  `jf` int(11) NOT NULL,
  `give` tinyint(1) NOT NULL DEFAULT '0',
  `remark` varchar(50) NOT NULL,
  `price` decimal(11,2) DEFAULT '0.00',
  `type` tinyint(1) DEFAULT '0' COMMENT '默认普通物品',
  `shop` tinyint(1) NOT NULL DEFAULT '0',
  `dan` tinyint(1) NOT NULL,
  `randnum` tinyint(4) NOT NULL,
  `desc` varchar(200) NOT NULL,
  `sort` int(11) NOT NULL DEFAULT '50',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_question` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `type_id` int(11) DEFAULT NULL,
  `question` varchar(100) DEFAULT NULL,
  `answer_a` varchar(100) DEFAULT NULL,
  `answer_b` varchar(100) DEFAULT NULL,
  `answer_c` varchar(100) NOT NULL,
  `answer_d` varchar(100) DEFAULT NULL,
  `easy` char(1) DEFAULT NULL,
  `answer` char(1) DEFAULT NULL,
  `createtime` char(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=148440 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_question_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `thumbs` varchar(100) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `pid` int(11) DEFAULT '0',
  `upgrade` text NOT NULL,
  `desc1` varchar(200) NOT NULL,
  `desc2` varchar(200) NOT NULL,
  `createtime` char(10) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_season` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `no` int(11) NOT NULL DEFAULT '1',
  `name` varchar(20) NOT NULL,
  `starttime` char(10) NOT NULL,
  `endtime` char(10) NOT NULL,
  `createtime` char(10) NOT NULL,
  `status` char(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `index` text NOT NULL,
  `basic` text NOT NULL,
  `ques` text NOT NULL,
  `follow` text NOT NULL,
  `forward` text NOT NULL,
  `notice` text NOT NULL,
  `sign` text NOT NULL,
  `tpl` text NOT NULL,
  `active` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_shenhe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `stact` int(11) NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `img` varchar(255) DEFAULT NULL,
  `content` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT NULL,
  `avatar` varchar(200) DEFAULT NULL,
  `nickname` varchar(50) DEFAULT NULL,
  `openid` varchar(50) DEFAULT NULL,
  `sessionkey` varchar(50) NOT NULL,
  `gender` tinyint(1) NOT NULL,
  `province` varchar(50) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `country` varchar(50) DEFAULT NULL,
  `createtime` char(10) DEFAULT NULL,
  `status` char(1) DEFAULT '1',
  `robot` char(1) NOT NULL DEFAULT '0',
  `inans` char(1) NOT NULL DEFAULT '0',
  `border` varchar(100) NOT NULL,
  `moneycode` varchar(200) NOT NULL,
  `unionid` varchar(50) NOT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=1616 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_cate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL DEFAULT '0',
  `uid` int(11) NOT NULL DEFAULT '0',
  `tid` int(11) NOT NULL DEFAULT '0',
  `level` int(11) NOT NULL DEFAULT '0',
  `plus` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_catelog` (
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `tid` int(11) NOT NULL,
  `before` int(11) NOT NULL,
  `now` int(11) NOT NULL,
  `book` int(11) NOT NULL,
  `num` int(11) NOT NULL,
  `gold` int(11) NOT NULL,
  `createtime` char(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_forward` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `openGId` varchar(30) NOT NULL,
  `createtime` char(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_friends` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `fid` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_gold` (
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `gold` int(11) NOT NULL,
  `type` int(11) NOT NULL DEFAULT '0' COMMENT '0加1减',
  `source` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0答题1分享',
  `addtime` char(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_history` (
  `uid` int(11) DEFAULT '0',
  `weid` int(11) DEFAULT '0',
  `sid` int(11) NOT NULL DEFAULT '0',
  `level` tinyint(3) DEFAULT '1',
  `expe` int(11) DEFAULT '0',
  `dan` int(11) DEFAULT '1',
  `star` int(11) DEFAULT '0',
  `winrate` varchar(10) DEFAULT '0',
  `totalnum` int(11) DEFAULT '0',
  `winnum` int(11) DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) DEFAULT '0',
  `weid` int(11) DEFAULT '0',
  `sid` int(11) NOT NULL DEFAULT '0',
  `level` tinyint(3) DEFAULT '1',
  `expe` int(11) DEFAULT '0',
  `maxexpe` int(11) DEFAULT '0',
  `dan` int(11) DEFAULT '1',
  `star` int(11) DEFAULT '0',
  `gold` int(11) DEFAULT '0',
  `winrate` varchar(10) DEFAULT '0',
  `totalnum` int(11) DEFAULT '0',
  `winnum` int(11) DEFAULT '0',
  `jbtime` char(10) NOT NULL,
  `jbnum` int(11) NOT NULL,
  `jytime` char(10) NOT NULL,
  `jynum` int(11) NOT NULL,
  `jfnum` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1616 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_prop` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `weid` int(11) DEFAULT '0',
  `uid` int(11) NOT NULL,
  `pid` int(11) DEFAULT '0',
  `num` int(11) DEFAULT '0',
  `usenum` tinyint(4) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2521 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_proplog` (
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  `type` char(1) DEFAULT NULL COMMENT '1签到2充值3系统赠送4使用5开宝箱',
  `top` int(11) NOT NULL,
  `num` int(11) DEFAULT NULL,
  `createtime` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_hc_user_sign` (
  `weid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `sid` int(11) NOT NULL,
  `date` char(10) NOT NULL,
  `signtime` char(10) NOT NULL,
  `pid` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
";
pdo_run($sql);
if(!pdo_fieldexists("hc_ad", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_ad", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_ad", "name")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   `name` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("hc_ad", "appid")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   `appid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("hc_ad", "path")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   `path` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_ad", "desc")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   `desc` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_ad", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_ad")." ADD   UNIQUE KEY `id` (`id`);");
}
if(!pdo_fieldexists("hc_bonus", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_bonus", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_bonus", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_bonus", "sid")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `sid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_bonus", "money")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `money` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("hc_bonus", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_bonus", "addtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `addtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_bonus", "dealtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_bonus")." ADD   `dealtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_dan", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_dan", "dan_id")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `dan_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "season")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `season` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "name")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `name` varchar(20) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_dan", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `thumb` varchar(100) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_dan", "win_star")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `win_star` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_dan", "use_gold")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `use_gold` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_dan", "win_gold")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `win_gold` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_dan", "quesids")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `quesids` text NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "reward")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `reward` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_dan", "winexp")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `winexp` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "failexp")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `failexp` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "rewardnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `rewardnum` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_dan", "border")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `border` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_dan", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `createtime` char(10) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_dan", "robot")) {
 pdo_query("ALTER TABLE ".tablename("hc_dan")." ADD   `robot` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1开启';");
}
if(!pdo_fieldexists("hc_dy_users", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID';");
}
if(!pdo_fieldexists("hc_dy_users", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `uid` int(11) NOT NULL COMMENT 'members UID';");
}
if(!pdo_fieldexists("hc_dy_users", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `uniacid` int(11) NOT NULL COMMENT '所属公众号ID';");
}
if(!pdo_fieldexists("hc_dy_users", "openid")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `openid` varchar(255) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("hc_dy_users", "formid")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `formid` varchar(255) NOT NULL COMMENT 'formid每次记录表单ID';");
}
if(!pdo_fieldexists("hc_dy_users", "nick_name")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `nick_name` varchar(255) NOT NULL COMMENT '昵称';");
}
if(!pdo_fieldexists("hc_dy_users", "avatar_url")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `avatar_url` varchar(255) NOT NULL COMMENT '头像';");
}
if(!pdo_fieldexists("hc_dy_users", "gender")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `gender` int(1) NOT NULL COMMENT '性别0是男 1是女';");
}
if(!pdo_fieldexists("hc_dy_users", "city")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `city` varchar(255) NOT NULL COMMENT '市';");
}
if(!pdo_fieldexists("hc_dy_users", "province")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `province` varchar(255) NOT NULL COMMENT '省';");
}
if(!pdo_fieldexists("hc_dy_users", "country")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `country` varchar(255) NOT NULL COMMENT '国籍';");
}
if(!pdo_fieldexists("hc_dy_users", "regist_time")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `regist_time` varchar(255) NOT NULL COMMENT '注册时间';");
}
if(!pdo_fieldexists("hc_dy_users", "active_time")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_users")." ADD   `active_time` varchar(255) NOT NULL COMMENT '最后活动时间';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `id` int(25) NOT NULL AUTO_INCREMENT COMMENT 'ID';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `uniacid` int(25) NOT NULL COMMENT '所属公众号ID';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_title")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_title` varchar(255) NOT NULL COMMENT '影片名字';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_img")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_img` varchar(255) NOT NULL COMMENT '影片海报';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_zhuyan")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_zhuyan` varchar(255) NOT NULL COMMENT '影片主演';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_lei")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_lei` text NOT NULL COMMENT '类  电影  电视  综艺';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_leiname")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_leiname` text NOT NULL COMMENT '影片的类型';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_diqu")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_diqu` varchar(255) NOT NULL COMMENT '影片地区';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_nianfen")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_nianfen` text NOT NULL COMMENT '影片年份';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_pingfen")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_pingfen` int(25) NOT NULL COMMENT '影片评分';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_jieshao")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_jieshao` varchar(255) NOT NULL COMMENT '影片介绍';");
}
if(!pdo_fieldexists("hc_dy_yingpian", "yingpian_url")) {
 pdo_query("ALTER TABLE ".tablename("hc_dy_yingpian")." ADD   `yingpian_url` varchar(255) NOT NULL COMMENT '影片地址';");
}
if(!pdo_fieldexists("hc_formid", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_formid")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_formid", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_formid")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_formid", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_formid")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_formid", "formid")) {
 pdo_query("ALTER TABLE ".tablename("hc_formid")." ADD   `formid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("hc_formid", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_formid")." ADD   `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_formid", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_formid")." ADD   UNIQUE KEY `id` (`id`);");
}
if(!pdo_fieldexists("hc_grade", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_grade")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_grade", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_grade")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_grade", "levelno")) {
 pdo_query("ALTER TABLE ".tablename("hc_grade")." ADD   `levelno` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_grade", "levelname")) {
 pdo_query("ALTER TABLE ".tablename("hc_grade")." ADD   `levelname` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("hc_grade", "levelexp")) {
 pdo_query("ALTER TABLE ".tablename("hc_grade")." ADD   `levelexp` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_order", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_order", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `weid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_order", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_order", "pid")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `pid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_order", "ordersn")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `ordersn` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("hc_order", "formId")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `formId` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("hc_order", "fee")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `fee` decimal(11,2) NOT NULL;");
}
if(!pdo_fieldexists("hc_order", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_order", "paystatus")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `paystatus` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_order", "paytime")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `paytime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_order", "transid")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `transid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("hc_order", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `createtime` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_order", "package")) {
 pdo_query("ALTER TABLE ".tablename("hc_order")." ADD   `package` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_pk_log", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "rid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `rid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `uid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "usegold")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `usegold` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "score")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `score` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "gold")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `gold` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "expe")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `expe` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "scoreplus")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `scoreplus` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "goldplus")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `goldplus` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_log", "expeplus")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_log")." ADD   `expeplus` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_pk_question", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "rid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `rid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "qid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `qid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "answer")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `answer` char(1) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "plus")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `plus` int(5) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_question", "score")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `score` int(5) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_question", "min")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `min` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_question", "right")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `right` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_question", "addtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_question")." ADD   `addtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_pk_record", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "dan")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `dan` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "userid_one")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `userid_one` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "userid_two")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `userid_two` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "userone_score")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `userone_score` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_record", "usertwo_score")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `usertwo_score` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_record", "questions")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `questions` text NOT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "status1")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `status1` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_record", "status2")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `status2` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_pk_record", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `createtime` char(10) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_pk_record", "type")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `type` tinyint(1) DEFAULT '0' COMMENT '1好友对战';");
}
if(!pdo_fieldexists("hc_pk_record", "leave")) {
 pdo_query("ALTER TABLE ".tablename("hc_pk_record")." ADD   `leave` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1加入2开始3离开';");
}
if(!pdo_fieldexists("hc_prop", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_prop", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_prop", "name")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `name` varchar(20) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_prop", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `thumb` varchar(200) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_prop", "usethumb")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `usethumb` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "newthumb")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `newthumb` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "cc")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `cc` int(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_prop", "sj")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `sj` int(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_prop", "jb")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `jb` int(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_prop", "jy")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `jy` int(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_prop", "jf")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `jf` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "give")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `give` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_prop", "remark")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `remark` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "price")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `price` decimal(11,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("hc_prop", "type")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `type` tinyint(1) DEFAULT '0' COMMENT '默认普通物品';");
}
if(!pdo_fieldexists("hc_prop", "shop")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `shop` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_prop", "dan")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `dan` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "randnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `randnum` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "desc")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `desc` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_prop", "sort")) {
 pdo_query("ALTER TABLE ".tablename("hc_prop")." ADD   `sort` int(11) NOT NULL DEFAULT '50';");
}
if(!pdo_fieldexists("hc_question", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_question", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "type_id")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `type_id` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "question")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `question` varchar(100) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "answer_a")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `answer_a` varchar(100) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "answer_b")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `answer_b` varchar(100) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "answer_c")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `answer_c` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("hc_question", "answer_d")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `answer_d` varchar(100) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "easy")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `easy` char(1) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "answer")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `answer` char(1) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_question")." ADD   `createtime` char(10) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_question_type", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "thumbs")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `thumbs` varchar(100) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "name")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `name` varchar(50) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "pid")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `pid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_question_type", "upgrade")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `upgrade` text NOT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "desc1")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `desc1` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "desc2")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `desc2` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `createtime` char(10) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_question_type", "sort")) {
 pdo_query("ALTER TABLE ".tablename("hc_question_type")." ADD   `sort` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_season", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_season", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_season", "no")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `no` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("hc_season", "name")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `name` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("hc_season", "starttime")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `starttime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_season", "endtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `endtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_season", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `createtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_season", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_season")." ADD   `status` char(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_setting", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_setting", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "index")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `index` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "basic")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `basic` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "ques")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `ques` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "follow")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `follow` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "forward")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `forward` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "notice")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `notice` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "sign")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `sign` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "tpl")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `tpl` text NOT NULL;");
}
if(!pdo_fieldexists("hc_setting", "active")) {
 pdo_query("ALTER TABLE ".tablename("hc_setting")." ADD   `active` text NOT NULL;");
}
if(!pdo_fieldexists("hc_shenhe", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_shenhe", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_shenhe", "stact")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `stact` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_shenhe", "name")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `name` varchar(255) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_shenhe", "time")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `time` datetime DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_shenhe", "sort")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `sort` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_shenhe", "img")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `img` varchar(255) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_shenhe", "content")) {
 pdo_query("ALTER TABLE ".tablename("hc_shenhe")." ADD   `content` text;");
}
if(!pdo_fieldexists("hc_user", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `uid` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_user", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `weid` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `avatar` varchar(200) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `nickname` varchar(50) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "openid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `openid` varchar(50) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "sessionkey")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `sessionkey` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("hc_user", "gender")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `gender` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("hc_user", "province")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `province` varchar(50) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "city")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `city` varchar(50) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "country")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `country` varchar(50) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `createtime` char(10) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `status` char(1) DEFAULT '1';");
}
if(!pdo_fieldexists("hc_user", "robot")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `robot` char(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user", "inans")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `inans` char(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user", "border")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `border` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("hc_user", "moneycode")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `moneycode` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("hc_user", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user")." ADD   `unionid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_cate", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_cate")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_user_cate", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_cate")." ADD   `weid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_cate", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_cate")." ADD   `uid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_cate", "tid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_cate")." ADD   `tid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_cate", "level")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_cate")." ADD   `level` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_cate", "plus")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_cate")." ADD   `plus` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_catelog", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "tid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `tid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "before")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `before` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "now")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `now` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "book")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `book` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "num")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `num` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "gold")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `gold` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_catelog", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_catelog")." ADD   `createtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_forward", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_forward")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_user_forward", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_forward")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_forward", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_forward")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_forward", "openGId")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_forward")." ADD   `openGId` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_forward", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_forward")." ADD   `createtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_friends", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_friends")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_user_friends", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_friends")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_friends", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_friends")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_friends", "fid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_friends")." ADD   `fid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_friends", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_friends")." ADD   UNIQUE KEY `id` (`id`);");
}
if(!pdo_fieldexists("hc_user_gold", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_gold")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_gold", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_gold")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_gold", "gold")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_gold")." ADD   `gold` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_gold", "type")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_gold")." ADD   `type` int(11) NOT NULL DEFAULT '0' COMMENT '0加1减';");
}
if(!pdo_fieldexists("hc_user_gold", "source")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_gold")." ADD   `source` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0答题1分享';");
}
if(!pdo_fieldexists("hc_user_gold", "addtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_gold")." ADD   `addtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_history", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `weid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "sid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `sid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "level")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `level` tinyint(3) DEFAULT '1';");
}
if(!pdo_fieldexists("hc_user_history", "expe")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `expe` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "dan")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `dan` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("hc_user_history", "star")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `star` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "winrate")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `winrate` varchar(10) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "totalnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `totalnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "winnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `winnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_history", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_history")." ADD   `status` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("hc_user_info", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_user_info", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `weid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "sid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `sid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "level")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `level` tinyint(3) DEFAULT '1';");
}
if(!pdo_fieldexists("hc_user_info", "expe")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `expe` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "maxexpe")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `maxexpe` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "dan")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `dan` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("hc_user_info", "star")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `star` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "gold")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `gold` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "winrate")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `winrate` varchar(10) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "totalnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `totalnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "winnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `winnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_info", "jbtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `jbtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_info", "jbnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `jbnum` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_info", "jytime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `jytime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_info", "jynum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `jynum` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_info", "jfnum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_info")." ADD   `jfnum` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_prop", "id")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("hc_user_prop", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `weid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_prop", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_prop", "pid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `pid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_prop", "num")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `num` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_prop", "usenum")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `usenum` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_prop", "status")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_prop")." ADD   `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("hc_user_proplog", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_proplog", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_proplog", "pid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `pid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_proplog", "type")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `type` char(1) DEFAULT NULL COMMENT '1签到2充值3系统赠送4使用5开宝箱';");
}
if(!pdo_fieldexists("hc_user_proplog", "top")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `top` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_proplog", "num")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `num` int(11) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user_proplog", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_proplog")." ADD   `createtime` char(10) DEFAULT NULL;");
}
if(!pdo_fieldexists("hc_user_sign", "weid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_sign")." ADD   `weid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_sign", "uid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_sign")." ADD   `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_sign", "sid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_sign")." ADD   `sid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_sign", "date")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_sign")." ADD   `date` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_sign", "signtime")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_sign")." ADD   `signtime` char(10) NOT NULL;");
}
if(!pdo_fieldexists("hc_user_sign", "pid")) {
 pdo_query("ALTER TABLE ".tablename("hc_user_sign")." ADD   `pid` int(11) NOT NULL;");
}

 ?>